WebPatchJSON

Note: This statement is only used in load test scripts. See Load Testing for more information.

Sends a PATCH command from a JSON statement and returns the data received from a web page. If a referrer URL was specified by the WebSetReferrer statement, it is also sent with the request.

Syntax

WebPatchJSON("URL", JSON)

Arguments

Argument Description
URL URL to send the request to. Only supports http and https protocols. Relative paths are automatically prepended with the %URLROOT% repository variable.
JSON JSON object or string to attach to the request.

Return value

Value Description
Value Data received from the web page.

Example

' Update session ID before patching file contents

contents = ReadTextFile("patch.txt", EncodingAutoDetect)

jsonObject = JSONParse(contents)

jsonObject = JSONObjectSetValue(jsonObject, "sessionID", sessionID)

WebPatchJSON("http://www.wysicorp.com/login.php", jsonObject)